﻿@RenderPage(view)
@functions{
    private string action;
    private string id;
    private string view;
    protected override void InitializePage()
    {
    // Get first verb from Url and use as action
    var action = UrlData[0].ToLower(); 
    // Get second verb and use it as id.
    var id = UrlData[1];
    // Example:
    // mysite.com/projects/edit/0
    // UrlData[0] returns "edit"
    // UrlData[1] returns "0"
     
    // Now act on the action verb:   
     switch(action) {   
        case "new":
           
                    break;
        case "searchcc":
            view="/CashCard/_SearchCC.cshtml";
            break;
        case "upload":
            view="/CashCard/_UploadNew.cshtml";
            break;
        case "files":
            view="/CashCard/_FileListNew.cshtml";
            break;
            
        default:
                view = "/CashCard/_Menu.cshtml";       
                break;
     }
    }
}
